1. Field of the Invention
The present invention relates to a control device and a computer program product for controlling method.
2. Description of the Related Art
Conventionally, various techniques for reducing the power consumption of an electronic apparatus have been known. For example, a digital Multi Function Peripheral (MFP) having a normal mode in which processing such as printing can be executed and an energy saving mode in which power consumption is smaller than that in the normal mode has been disclosed in Japanese Patent Application Laid-open No. 2010-218399. In Japanese Patent Application Laid-open No. 2010-218399, when a condition under which the digital MFP is shifted to be in the energy saving mode from the normal mode has been satisfied, a snapshot indicating information of operation environment is created to be stored in a non-volatile memory; and the digital MFP is shifted to be in the energy saving mode. Furthermore, Japanese Patent Application Laid-open No. 2010-218399 also discloses a technique in which one energy saving mode can be shifted into another energy saving mode directly.
Japanese Patent Application Laid-open No. 2010-218399, however, has no description on detailed contents when states are shifted from an OFF mode in which power consumption is the smallest among energy saving modes to a suspend-to-RAM (STR) mode as an energy saving mode in which electric power is supplied to a volatile memory and snapshot is held in the volatile memory.
For example, the following configuration is supposed. That is, in the configuration, when an activation time indicating a time during which electric power is supplied to a CPU and the CPU is made to be in an operable first state exceeds a threshold, energy saving control is performed such that a state of the CPU is set to a second state in which power consumption is smaller than that in the first state. In this case, the above-mentioned threshold is contained in snapshot. It is assumed that when states are shifted from the OFF mode to the STR mode, the snapshot held in the non-volatile memory is written into the volatile memory as it is. In this case, the CPU is activated once and executes writing of the snapshot. Therefore, the activation time is counted for an amount of a time in which the CPU has been activated temporarily. Accordingly, a time, until the CPU is shifted to be in the second state after having been recovered to be in the first state next, is shortened by an amount of the counted activation time. Therefore, the CPU is shifted to be in the second state at an unexpected time.
Furthermore, Japanese Patent Application Laid-open No. 2010-218399 has no description on detailed contents when states are shifted from the STR mode to the OFF mode. It is assumed that the snapshot held in the volatile memory is written into the non-volatile memory as it is when states are shifted from the STR mode to the OFF mode. In this case, the CPU is activated once and executes writing of the snapshot. Therefore, the activation time is counted for an amount of a time in which the CPU has been activated temporarily. Accordingly, a time until the CPU is shifted to be in the second state after having been recovered to be in the first state is shortened by an amount of the counted activation time. Therefore, the CPU is shifted to be in the second state at an unexpected time. As described above, there is a problem that energy saving control cannot be performed accurately with the technique that has been disclosed in Japanese Patent Application Laid-open No. 2010-218399.
There is a need to provide a control device and computer program product for controlling method that can perform energy saving control accurately.